package com.itcanteen.medical.patient.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 充值记录
 * @author 1804A-TeamOne
 * @date 2020-12-17 16:10
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "recharge_record")
@Data
@NoArgsConstructor
public class RechargeRecord extends BaseEntity {

    /**
     用户id
     */
    @Column(name = "user_id", nullable = false)
    private Integer userId;

    /**
     支付金额
     */
    @Column(name = "pay_money", nullable = false)
    private Double payMoney;

    /**
     @param userId 用户id
     @param payMoney 支付金额 构造方法
     */
    public RechargeRecord (Integer userId, Double payMoney) {
        this.userId = userId;
        this.payMoney = payMoney;
        this.setCreateTime(new Date());
        this.setUpdateTime(new Date());
    }
}
